<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let str="今天天气很美丽";
        console.log(str.startsWith("今天"));
        console.log(str.endsWith("美丽"));

        //repeat
        let str1="张三";
        let str2=str1.repeat(3);
        console.log(str2);
    </script>
</body>
</html>